package cn.iocoder.yudao.module.team.dal.mysql.scenicspot;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.team.dal.dataobject.scenicspot.ScenicspotDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.team.controller.admin.scenicspot.vo.*;

/**
 * 景点资料 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface ScenicspotMapper extends BaseMapperX<ScenicspotDO> {

    default PageResult<ScenicspotDO> selectPage(ScenicspotPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ScenicspotDO>()
                .likeIfPresent(ScenicspotDO::getName, reqVO.getName())
                .eqIfPresent(ScenicspotDO::getIntroduce, reqVO.getIntroduce())
                .betweenIfPresent(ScenicspotDO::getVisitdate, reqVO.getVisitdate())
                .eqIfPresent(ScenicspotDO::getIsactual, reqVO.getIsactual())
                .eqIfPresent(ScenicspotDO::getSupplier, reqVO.getSupplier())
                .eqIfPresent(ScenicspotDO::getIsshopping, reqVO.getIsshopping())
                .eqIfPresent(ScenicspotDO::getRating, reqVO.getRating())
                .eqIfPresent(ScenicspotDO::getType, reqVO.getType())
                .eqIfPresent(ScenicspotDO::getIsenable, reqVO.getIsenable())
                .eqIfPresent(ScenicspotDO::getIschangyong, reqVO.getIschangyong())
                .eqIfPresent(ScenicspotDO::getCity, reqVO.getCity())
                .eqIfPresent(ScenicspotDO::getNamephone, reqVO.getNamephone())
                .eqIfPresent(ScenicspotDO::getPhone, reqVO.getPhone())
                .eqIfPresent(ScenicspotDO::getFax, reqVO.getFax())
                .eqIfPresent(ScenicspotDO::getShiptype, reqVO.getShiptype())
                .eqIfPresent(ScenicspotDO::getNamesign, reqVO.getNamesign())
                .eqIfPresent(ScenicspotDO::getIntroduce2, reqVO.getIntroduce2())
                .eqIfPresent(ScenicspotDO::getColumn1, reqVO.getColumn1())
                .eqIfPresent(ScenicspotDO::getColumn2, reqVO.getColumn2())
                .eqIfPresent(ScenicspotDO::getColumn3, reqVO.getColumn3())
                .eqIfPresent(ScenicspotDO::getColumn4, reqVO.getColumn4())
                .eqIfPresent(ScenicspotDO::getColumn5, reqVO.getColumn5())
                .betweenIfPresent(ScenicspotDO::getCreateTime, reqVO.getCreateTime())
                .likeIfPresent(ScenicspotDO::getFeename, reqVO.getFeename())
                .eqIfPresent(ScenicspotDO::getRetailPricec, reqVO.getRetailPricec())
                .eqIfPresent(ScenicspotDO::getSomePricec, reqVO.getSomePricec())
                .eqIfPresent(ScenicspotDO::getBasePricec, reqVO.getBasePricec())
                .eqIfPresent(ScenicspotDO::getRetailPricee, reqVO.getRetailPricee())
                .eqIfPresent(ScenicspotDO::getSomePricee, reqVO.getSomePricee())
                .eqIfPresent(ScenicspotDO::getBasePricee, reqVO.getBasePricee())
                .eqIfPresent(ScenicspotDO::getBasePriceq, reqVO.getBasePriceq())
                .orderByDesc(ScenicspotDO::getId));
    }

}